package summer_vacation.liqing;

/**
 * Created by 123456 on 2015/8/7.
 */
import java.util.*;
public class Java27 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入a b c:");
        double a,b,c;
        a=in.nextDouble();
        b=in.nextDouble();
        c=in.nextDouble();
        double d=b*b-4*a*c;
        if (d==0){
            System.out.println("x="+(-b)/(2*a));
        }
        else if (d<0){
            System.out.println("无解");
        }
        else{
            System.out.println("x1="+(-b+Math.sqrt(d))/(2*a));
            System.out.println("x2="+(-b-Math.sqrt(d))/(2*a));
        }
    }
}
